
<div id="divmain">
  <!-- 表格区 -->
  <div class="col-sm-12">
    <data-table (changepage)="changepage($event)" [title]="title" [arr]="arrbutes" [addButton]="btnAdd" (addOpen)="addOpen($event,addModal)"
      [editButton]="btnEdit" [deleteButton]="btnDelete" (deletesEmit)="deleteDatas($event)" [importButton]="btnImport" (importEmit)="import($event)"
      [exportButton]="btnExport" (exportEmit)="export($event)" [buttonList]="btnList" (operat)="operatData($event,editModal)" 
      [total]="total"
      
      [data]="data" [page]="page" [sizeList]="sizeList" [paging]="paging" [pageSize]="pageSize" [buttonstyle]="btnstyle">
    </data-table>
  </div>
    <!-- 添加弹出框 -->
    <div #addModal class="modal-dialog" (click)="draggable()" >
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" (click)="close(addModal)">×
          </button>
          <h4 class="modal-title">
            添加通知类别
          </h4>
        </div>
        <div class="modal-body">
          <form role="form" class="form-horizontal" #addform="ngForm">
            <div class="form-group">
              <div class="col-sm-6 form-inline">
                <label class="control-label">通知类别：</label>
                <label>
                  <input type="text" #name="ngModel" id="name" class="form-control" onfocus="this.select()" [(ngModel)]="noticeCategory.columnName"  placeholder="请输入通知类别名称"
                    name="name">
                </label>
              </div>
              <div class="col-sm-6 form-inline">
                <label class="control-label">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</label>
                <label>
                  <input type="text" class="form-control" [(ngModel)]="noticeCategory.remark"  placeholder="请输入备注" name="name">
                </label>
              </div>
            </div>
          </form>
        </div>
        <div class="modal-footer">
            <!-- disabled="disabled" -->
          <button type="button" class="btn btn-primary"   (click)="add(addModal)">
            添加
          </button>
          <button type="button" class="btn btn-default" (click)="close(addModal)">
            取消
          </button>
        </div>
      </div>
    </div>
  
    <!-- 修改弹出框 -->
    <div #editModal class="modal-dialog" (click)="draggable()">
      <div class="modal-content">
        <form>
          <div class="modal-header">
            <button type="button" class="close" (click)="close(editModal)">×
            </button>
            <h4 class="modal-title">
              修改通知类别
            </h4>
          </div>
          <div class="modal-body">
            <form role="form" class="form-horizontal" #addform="ngForm">
              <div class="form-group">
                <div class="col-sm-6 form-inline">
                  <label class="control-label">通知类别：</label>
                  <label>
                    <input type="text" #name="ngModel" id="name" class="form-control" onfocus="this.select()" [(ngModel)]="noticeCategory.columnName"
                      name="columnName">
                  </label>
                </div>
                <div class="col-sm-6 form-inline">
                  <label class="control-label">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</label>
                  <label>
                    <input type="text" class="form-control" [(ngModel)]="noticeCategory.remark" name="remark">
                  </label>
                </div>
              </div>                
            </form>
          </div>
          <div class="modal-footer">
              <!-- disabled="disabled" -->
            <button type="button" class="btn btn-primary"  (click)="update(editModal)">
              修改
            </button>
            <button type="button" class="btn btn-default" (click)="close(editModal)">
              取消
            </button>
          </div>
        </form>
      </div>
    </div>
  
    <!-- 右上角提示信息 -->
    <p-growl [value]="msgs"></p-growl>
    
    <!-- 提示框，隐藏IP地址 -->
    <p-dialog header="提示" [(visible)]="display" modal="modal" width="400" [responsive]="true">
        <p style="text-align:center">
          {{messages}}
        </p>
    
        <p-footer>
          <button type="button" pButton icon="fa-check" (click)="display=false" label="确定"></button>
        </p-footer>
    </p-dialog>

      <!--删除提示框-->
  <p-confirmDialog header="提示" icon="fa fa-question-circle" width="425"></p-confirmDialog>
</div>
